package com.snail.auth.service;

import com.snail.auth.dao.AuthOrgGradeRep;
import com.snail.auth.entity.AuthOrgGrade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 机构规格
 *
 * @Author: houyanfeng 2019/3/4
 */
@Service
@Transactional
public class AuthOrgGradeService {
    @Autowired
    private AuthOrgGradeRep authOrgGradeRep;

    public AuthOrgGrade getByKey(Long id) {
        return authOrgGradeRep.findById(id).get();
    }

    public List<AuthOrgGrade> list() {
        return authOrgGradeRep.findAll();
    }

}
